<%@page contentType="text/html;charset=UTF-8" %>
<%@page pageEncoding="UTF-8" %>
<%@ page session="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<c:if test="${pager.pagesCount > 1}">
    <div class="pager">
        <c:choose>
            <c:when test="${pager.currentPage > 0}">
                <a href="?pageNumber=${pager.currentPage - 1}" class="prevLink">&lt;<spring:message
                        code="pager.prev"/></a>
            </c:when>
            <c:otherwise>
                <span class="disabled">&lt;<spring:message code="pager.prev"/></span>
            </c:otherwise>
        </c:choose>

        <span class="currentPage">${pager.currentPage + 1}</span>

        <c:choose>
            <c:when test="${pager.currentPage < pager.pagesCount - 1}">
                <a href="?pageNumber=${pager.currentPage + 1}" class="nextLink"><spring:message
                        code="pager.next"/>&gt;</a>
            </c:when>
            <c:otherwise>
                <span class="disabled"><spring:message code="pager.next"/>&gt;</span>
            </c:otherwise>
        </c:choose>
    </div>
</c:if>